import {baseRequest} from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/hwVehicle/hwvehiclerepairlog/` + url, ...arg)

/**
 * 维修记录Api接口管理器
 *
 * @author cxk
 * @date  2024/02/01 15:17
 **/
export default {
	// 获取维修记录分页
	hwVehicleRepairLogPage(data) {
		return request('page', data, 'get')
	},
	// 获取维修记录列表
	hwVehicleRepairLogList(data) {
		return request('list', data, 'get')
	},
	// 提交维修记录表单 edit为true时为编辑，默认为新增
	hwVehicleRepairLogSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除维修记录
	hwVehicleRepairLogDelete(data) {
		return request('delete', data)
	},
	// 获取维修记录详情
	hwVehicleRepairLogDetail(data) {
		return request('detail', data, 'get')
	}
}
